# 编译器设置
CC = gcc
CFLAGS = -Wall -Wextra -Werror -std=c11

# FFmpeg 库
LIBS = -lavcodec -lavformat -lavutil

# 源文件和目标文件
SRC = h264_to_mp4.c
TARGET = h264_to_mp4

# 默认目标
all: $(TARGET)

# 编译规则
$(TARGET): $(SRC)
	$(CC) $(CFLAGS) $^ -o $@ $(LIBS)

# 清理规则
clean:
	rm -f $(TARGET)

.PHONY: all clean 